import {TableColumn} from "@/components/k-view/table/types";

export const cidAccountManage: TableColumn[] = [
    {
        name: "advertiser_name_id",
        label: "",
        default: 1,
        fixed: true,
        width: 160,
        align: "center",
        headSlot: "advertiserName",
        slot: "advertiserName",
        hide: true,
    },
    {
        name: "operation",
        label: "操作",
        default: 1,
        align: 'center',
        slot: "operation",
    },
    {
        "label": "消耗",
        "name": "cost",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "总付款金额",
        "name": "alipay_total_price",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "总订单数",
        "name": "alipay_count",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "ROI",
        "name": "roi",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    // {
    // 	"label": "7日ROI",
    // 	"name": "roi_week",
    // 	"default": 0,
    // 	"sorter": true,
    // 	"align": "center"
    // },
    // {
    // 	"label": "15日ROI",
    // 	"name": "roi_half_month",
    // 	"default": 0,
    // 	"sorter": true,
    // 	"align": "center"
    // },
    {
        "label": "平均客单价",
        "name": "order_single",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "平均点击单价",
        "name": "cpc_platform",
        "default": 1,
        "sorter": true,
        "align": "center",
        width: 100
    },
    {
        "label": "平均千次展示",
        "name": "cpm_platform",
        "default": 1,
        "sorter": true,
        "align": "center",
        width: 100
    },
    {
        "label": "展示数",
        "name": "show",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "点击数",
        "name": "click",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "转化数",
        "name": "convert",
        "default": 1,
        "sorter": true,
        "align": "center"
    },
    // {
    // 	"label": "投放时间",
    // 	"name": "create_time",
    // 	"default": 0,
    // 	"sorter": true,
    // 	"align": "center"
    // },
    {
        "label": "下单总金额",
        "name": "all_alipay_total_price",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "下单ROI",
        "name": "roi_all",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "下单总订单数",
        "name": "all_alipay_count",
        "default": 0,
        "sorter": true,
        "align": "center",
        width: 100
    },
    {
        "label": "添加购物车量",
        "name": "add_cart_volume",
        "default": 0,
        "sorter": true,
        "align": "center",
        width: 100
    },
    {
        "label": "加购成本",
        "name": "buy_cost",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "转化成本",
        "name": "convert_cost",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "收藏宝贝量",
        "name": "favorite_baby_volume",
        "default": 0,
        "sorter": true,
        "align": "center"
    },
    {
        "label": "单品加入购物车量",
        "name": "direct_add_cart_volume",
        "default": 0,
        "sorter": true,
        "align": "center",
        width: 120
    },
    {
        "label": "单品收藏量",
        "name": "direct_favorite_baby_volume",
        "default": 0,
        "sorter": true,
        "align": "center"
    }
]


// UD数据面板列
const getSwiperData = () => {
    let data = [ // 概览
        {
            label: "消耗",
            field: "cost",
            default: 1,
            chain: "cost_chain" // 环比
        },
        {
            label: "展示数",
            field: "ad_pv",
            default: 1,
            chain: "ad_pv_chain" // 环比
        },
        {
            label: "千次展现成本",
            field: "ecpm",
            default: 1,
            chain: "ecpm_chain" // 环比
        },

        {
            label: "点击数",
            field: "click",
            default: 1,
            chain: "click_chain" // 环比
        },

        {
            label: "点击率",
            field: "ad_ctr",
            chain: "ad_ctr_chain" // 环比
        },

        {
            label: "点击单价",
            field: "ecpc",
            chain: "ecpc_chain" // 环比
        },

        // 互动
        {
            label: "点赞数",
            field: "like_nums",
            chain: "like_nums_chain" // 环比
        },
        {
            label: "分享数",
            field: "share_nums",
            chain: "share_nums_chain" // 环比
        },

        //视频
        {
            label: "播放数",
            field: "play_nums",
            chain: "play_nums_chain" // 环比
        },
        {
            label: "有效播放数",
            field: "effect_play_nums",
            chain: "effect_play_nums_chain" // 环比
        },
        {
            label: "有效播放率",
            field: "effect_play_rate",
            chain: "effect_play_rate_chain" // 环比
        },
        {
            label: "有效播放成本",
            field: "effect_play_cost",
            chain: "effect_play_cost_chain" // 环比
        },

        {
            label: "25%进度播放数",
            field: "play_nums25",
            chain: "play_nums25_chain" // 环比
        },
        {
            label: "50%进度播放数",
            field: "play_nums50",
            chain: "play_nums50_chain" // 环比
        },
        {
            label: "75%进度播放数",
            field: "play_nums75",
            chain: "play_nums75_chain" // 环比
        },
        {
            label: "99%进度播放数",
            field: "play_nums99",
            chain: "play_nums99_chain" // 环比
        },
        {
            label: "播放完总数",
            field: "play_over_nums",
            chain: "play_over_nums_chain" // 环比
        },
        {
            label: "播完率",
            field: "finish_play_rate",
            chain: "finish_play_rate_chain" // 环比
        },
        {
            label: "平均单次播放时长",
            field: "average_play_time",
            chain: "average_play_time_chain" // 环比
        },
        {
            label: "wifi播放占比",
            field: "wifi_play_percent",
            chain: "wifi_play_percent_chain" // 环比
        },

        // 转化
        {
            label: "转化数",
            field: "convert",
            default: 1,
            chain: "convert_chain" // 环比
        },
        {
            label: "转化率",
            field: "convert_rate",
            chain: "convert_rate_chain" // 环比
        },

        {
            label: "转化成本",
            field: "convert_cost",
            default: 1,
            chain: "convert_cost_chain"
        },

        {
            label: "拍下订单量",
            field: "take_order_volume",
            chain: "take_order_volume_chain"
        },
        {
            label: "拍下订单金额",
            field: "take_order_amount",
            chain: "take_order_amount_chain"
        },
        {
            label: "成交订单量",
            field: "transaction_volume",
            chain: "transaction_volume_chain"
        },
        {
            label: "成交订单金额",
            field: "transaction_amount",
            chain: "transaction_amount_chain"
        },
        {
            label: "收藏店铺量",
            field: "favorite_stores",
            chain: "favorite_stores_chain"
        },
        {
            label: "收藏宝贝量",
            field: "favorite_baby_volume",
            chain: "favorite_baby_volume_chain"
        },
        {
            label: "添加购物车量",
            field: "add_cart_volume",
            chain: "add_cart_volume_chain"
        },

        {
            label: "回搜量",
            field: "search_volume",
            chain: "search_volume_chain"
        },
        {
            label: "回访量",
            field: "visit_volume",
            chain: "visit_volume_chain"
        },
        {
            label: "收藏成本",
            field: "collection_cost",
            chain: "collection_cost_chain"
        },

        {
            label: "加购成本",
            field: "buy_cost",
            chain: "buy_cost_chain"
        },

        {
            label: "回搜成本",
            field: "search_cost",
            chain: "search_cost_chain"
        },

        {
            label: "回访成本",
            field: "visit_cost",
            chain: "visit_cost_chain"
        },

        {
            label: "投资回报率",
            field: "return_on_investment",
            chain: "return_on_investment_chain"
        },

        {
            label: "深度进店量",
            field: "depth_store_volume",
            chain: "depth_store_volume_chain"
        },
        {
            label: "深度访问时长",
            field: "visit_time",
            chain: "visit_time_chain"
        },

        {
            label: "深度访问页面数",
            field: "visit_page_volume",
            chain: "visit_page_volume_chain"
        },

        {
            label: "预售订单量",
            field: "pre_alipay_volume",
            chain: "pre_alipay_volume_chain"
        },

        {
            label: "预售订单金额",
            field: "pre_alipay_amount",
            chain: "pre_alipay_amount_chain"
        },
        {
            label: "订单成本",
            field: "alipay_cost",
            chain: "alipay_cost_chain"
        },
        // {
        // 	label: "有消耗账户数",
        // 	field: "advertiser_count",
        // 	chain: "advertiser_count_chain" // 环比
        // },
        // {
        // 	label: "平均转化成本",
        // 	field: "convert_cost_av",
        // 	chain: "convert_cost_av_chain" // 环比
        // },
    ]
    return data.map(item => item)
}

export const udAdData = getSwiperData();
export const udDataPreview = getSwiperData();

// CID数据面板列
const getCidSwiperData = () => {
    const data = [{
        "label": "消耗",
        "field": "cost",
        "default": 1,
        "chain": "cost_chain"
    },
        {
            "label": "总付款金额",
            "field": "alipay_total_price",
            "default": 1,
            "chain": "alipay_total_price_chain"
        },
        {
            "label": "总订单数",
            "field": "alipay_count",
            "default": 1,
            "chain": "alipay_count_chain"
        },
        {
            "label": "ROI",
            "field": "roi",
            "default": 1,
            "chain": "roi_chain"
        },
        {
            "label": "平均客单价",
            "field": "order_single",
            "default": 1,
            "chain": "order_single_chain"
        },
        {
            "label": "平均点击单价",
            "field": "avg_click_cost",
            "default": 1,
            "chain": "avg_click_cost_chain"
        },
        {
            "label": "平均千次展示",
            "field": "avg_show_cost",
            "default": 1,
            "chain": "avg_show_cost_chain"
        },
        {
            "label": "展示数",
            "field": "show",
            "default": 1,
            "chain": "show_chain"
        },
        {
            "label": "点击数",
            "field": "click",
            "default": 1,
            "chain": "click_chain"
        },
        {
            "label": "转化数",
            "field": "convert",
            "default": 1,
            "chain": "convert_chain"
        },
        {
            "label": "当日ROI",
            "field": "ad_roi",
            "default": 1,
            "chain": "ad_roi_chain"
        },

        // {
        // 	"label": "回流ROI",
        // 	"field": "roi",
        // 	"default": 1,
        // 	"chain": "roi_chain"
        // },roisingleCalculate
        {
            "label": "单品ROI",
            "field": "roi_single",
            "default": 0,
            "chain": "roi_single_chain"
        },
        {
            "label": "单品订单数",
            "field": "single_count",
            "default": 0,
            "chain": "single_count_chain"
        },
        {
            "label": "单品成交总金额",
            "field": "single_total_price",
            "default": 0,
            "chain": "single_total_price_chain"
        },
        {
            "label": "下单总金额",
            "field": "all_alipay_total_price",
            "default": 0,
            "chain": "all_alipay_total_price_chain"
        },
        {
            "label": "下单ROI",
            "field": "roi_all",
            "default": 0,
            "chain": "roi_all_chain"
        },
        {
            "label": "下单总订单数",
            "field": "all_alipay_count",
            "default": 0,
            "chain": "all_alipay_count_chain"
        },
        {
            "label": "添加购物车量",
            "field": "add_cart_volume",
            "default": 0,
            "chain": "add_cart_volume_chain"
        },
        {
            "label": "加购成本",
            "field": "buy_cost",
            "default": 0,
            "chain": "buy_cost_chain"
        },
        {
            "label": "转化成本",
            "field": "convert_cost",
            "default": 0,
            "chain": "convert_cost_chain"
        },
        {
            "label": "收藏宝贝量",
            "field": "favorite_baby_volume",
            "default": 0,
            "chain": "favorite_baby_volume_chain"
        },
        {
            "label": "单品加入购物车量",
            "field": "direct_add_cart_volume",
            "default": 0,
            "chain": "direct_add_cart_volume_chain"
        },
        {
            "label": "单品收藏量",
            "field": "direct_favorite_baby_volume",
            "default": 0,
            "chain": "direct_favorite_baby_volume_chain"
        },
    ];
    return data;
}


export const cidAdData = getCidSwiperData();

export const cidDataPreview = getCidSwiperData();
